<?php
namespace Fwadmin\Controller;
use Think\Controller;
class PageController extends BaseController{
	public function index(){
		$category_id	= I('category_id');
		$categoryInfo	= M('Category') -> where(array('id' => $category_id)) -> find();
		$id				= M('Page') -> where(array('category_id' => $category_id)) -> getField('id');
		$viewInfo		= M('Page') -> where(array('id' => $id)) -> find();
		$gallery		= M('Gallery') -> where(array('cid' => $viewInfo['cid'])) -> select();
		$this		-> assign('categoryInfo',$categoryInfo);
		$this		-> assign('viewInfo',$viewInfo);
		$this		-> assign('gallery',$gallery);
		$this		-> display();
	}
}